### if operator / compare operator / logic operator

# DEMO - if
# score = input("Please input you score: ")
# if score == "100":
#     print("Perfect")
# if score == "60":
#     print("Not bad")


# Compare operator
# == 等于
# != 不等于
# > 大于
# < 小于
# >= 大于等于
# <= 小于等于


# 逻辑运算符
# and 与
# or 或
# not 非


# DEMO - not
if not True:
    print("not True")
else:
    print("not False")

print(not False)


### 三元表达式
# 语法： 条件成立执行的表达式 if 条件 else 条件不成立执行的表达式
a = 1
b = 2
c = a if a > b else b
print(c)  # 2

staus_code = 201
result = "Success" if staus_code == 200 else "Failure"
print(result)

# if else

### if elif else


### if nested
age = 16
if age >= 18:
    print("Adult")
    if age <= 20:
        print("Still Young")
    elif 20 <= age <= 40:
        print("Power aged")
    elif 40 <= age <= 60:
        print("Penta aged")
    elif 60 <= age <= 80:
        print("Senior aged")
    elif 80 <= age <= 100:
        print("Old aged")
    else:
        print("Amzaing")
else:
    if age >= 12:
        print("Minor")
    else:
        print("Child")
